<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
	<head>
		<meta charset="utf-8">
		<title>博客编辑</title>
		<link rel="stylesheet" th:href="@{/layui/css/layui.css}" />
		<link rel="stylesheet" type="text/css" th:href="@{/layui/css/common.css}" />
		<link rel="stylesheet" type="text/css" th:href="@{/layui/css/blogcss/blog-edit.css}" />
	</head>
	<body>
	<!-- 公共头部 -->
	<div th:replace="FrontPages/common/head::head" name="headFrame"></div>
			<div class="blog-edit">
				<div class="blog-edit-head">
					<input type="text" name="title" required lay-verify="required" placeholder="请输入文章标题" autocomplete="off" class="layui-input"
						   th:if="${blog==null}">
					<input type="text" name="title" required lay-verify="required" placeholder="请输入文章标题" autocomplete="off" class="layui-input"
					th:if="${blog!=null}" th:value="${blog.title}?:'请输入文章标题'">
					<span>0/100</span>
				</div>
				<input th:id="blogcont" type="hidden" th:if="${blog!=null}" th:value="${blog.category}?:''">
                <input th:id="blogid" type="hidden" th:if="${blog!=null}" th:value="${blog.bid}?:''">
                <textarea th:if="${blog!=null}" th:text="${blog.content}?:''" class="layui-textarea" id="demo" name="content" style="display: none ;margin: 10px"></textarea>
				<textarea th:if="${blog==null}" class="layui-textarea" id="demo" name="content" style="display: none ;margin: 10px"></textarea>

			</div>
			<div class="blog-edit-class layui-form">
				<div class="blog-edit-item">
					<label class="layui-form-label">文章标签：</label>
					<div class="mark_selection_box">
						<span>+添加文章标签</span>
					</div>
				</div>
				<div class="blog-labels layui-anim layui-anim-scaleSpring">
					<i class="layui-icon label-icon">&#x1007;</i>
					<p>最多可以选择5个标签哦!</p>
					<span>java</span>
					<span>mysql</span>
					<span>git</span>
					<span>前端</span>
					<span>后端</span>
					<span>python</span>
					<span>云计算/大数据</span>
					<span>区块链</span>
					<span>数据库</span>
					<span>框架</span>
					<span>5G</span>
					<span>游戏开发</span>
					<span>移动开发</span>
					<span>安全</span>
					<span>运维</span>
					<span>人工智能</span>
					<span>其他</span>
				</div>
				<div class="blog-edit-item">
					<div class="mark_selection_list">
						<ul>
							<li th:each="label:${labels}">
								<span th:text="${label.label}"></span>
								<i class="layui-icon">&#x1007;</i>
							</li>
						</ul>
					</div>
				</div>
				<div class="blog-edit-item layui-form-item">
					<label class="layui-form-label">文章分类：</label>
					<select th:id="blog-class" lay-verify="">
						<!--<option value="1">请选择分类</option>-->
						<!--<option value="1">默认收藏夹</option>-->
						<!--<option value="2">JAVA</option>-->
						<!--<option value="3">前端</option>-->
						<option th:each="ca:${cate}" th:value="${ca.cid}" th:text="${ca.name}"></option>
					</select>
				</div>
				<div class="blog-edit-item">
					<label class="layui-form-label">发布形式：</label>
					<input type="radio" name="isOpened" th:if="${blog==null}" value="1" title="公开" checked>
					<input type="radio" name="isOpened" th:if="${blog==null}" value="0" title="私密">
                    <input type="radio" name="isOpened" th:if="${blog!=null}" th:checked="${blog.opened=='1'}" value="1" title="公开">
                    <input type="radio" name="isOpened" th:if="${blog!=null}" th:checked="${blog.opened=='0'}" value="0" title="私密">
				</div>
				<div class="blog-edit-item">
					<button class="release" type="button" th:id="but">发布文章</button>
					<button class="confirm">返回</button>
				</div>
			</div>
		<div style="clear: both"></div>

	<!--公共尾部-->
		<div th:replace="FrontPages/common/bottom::bottom" name="bottomFrame"></div>
		<script type="text/jscript" th:src="@{/layui/layui.js}"></script>
		<script type="text/jscript"th:src="@{/layui/lay/js/blog-edit.js}"></script>
		<!-- 背景特效 -->
		<script th:src="@{/layui/lineEffects.js}"></script>
	</body>
</html>
